//
//  TJKeychain.m
//  BaoDian
//
//  Created by mac on 2024/7/27.
//

#import "TJKeychain.h"
#import "SSKeychain.h"

NSString * const appleServiceName = @"com.rrbd.BaoDian";
NSString * const UDIDKey = @"accountKey";

@implementation TJKeychain

+ (BOOL)setObject:(NSString *)Object forKey:(NSString *)key {
    return [SSKeychain setPassword:Object forService:appleServiceName account:key];
}

+ (NSString *)objectForKey:(NSString *)key {
    return [SSKeychain passwordForService:appleServiceName account:key];
}

+ (BOOL)deleteForKey:(NSString *)key {
    return [SSKeychain deletePasswordForService:appleServiceName account:key];
}

+ (void)setUDID:(NSString *)UDID {
    [SSKeychain setPassword:UDIDKey forService:appleServiceName account:UDID];
}
 
+ (NSString *)UDID {
    return [SSKeychain passwordForService:appleServiceName account:UDIDKey];
}

@end
